import { defineStore } from 'pinia'
import { addClassification, classificationCategory, classificationList } from '../utils/trueType'
export const useAddClassificationStore = defineStore('addClassification', {
    state: () => ({
        ruleForm: {
            categoryId: null,
            category: '',
            subcategory: '',
            subcategoryNumber: 0,
            categoryIsDeactivate: 0,
            subcategoryId: '',
            subcategoryIsDeactivate: 0
        } as addClassification,
        categoryList: [
        ] as classificationCategory[],
        isOpen: false
    }),
    actions: {
        changeIsOpen() {
            this.isOpen = !this.isOpen
        },
        setRuleFormNull() {
            this.ruleForm = {
                categoryId: 0,
                category: '',
                subcategory: '',
                subcategoryNumber: 0,
                categoryIsDeactivate: 0,
                subcategoryId: '',
                subcategoryIsDeactivate: 0
            } as addClassification
        }
    },
    getters: {

    },
}
)